package com.zhongge;

import com.zhongge.aop.CapImpl;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class Springboot002AopApplication {

    public static void main(String[] args) {
        //springboot所返回的这个对象就是IOC容器
        ConfigurableApplicationContext ioc = SpringApplication.run(Springboot002AopApplication.class, args);
        CapImpl capImpl = (CapImpl) ioc.getBean("capImpl");
        capImpl.add(10,20);
        capImpl.sub(10,20);
    }

}
